test(scheduler/resource): add host, peer and task uint tests - #3790
Merged
Conversation
yxxhero
previously approved these changes
Jan 27, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3790 +/- ##
==========================================
+ Coverage 34.20% 34.28% +0.07%
==========================================
Files 337 337
Lines 38982 38986 +4
==========================================
+ Hits 13335 13366 +31
+ Misses 24806 24775 -31
- Partials 841 845 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
gaius-qi
force-pushed
the
feature/add-test
branch
from
February 10, 2025 03:22
2400900 to
0c7675e
Compare
yxxhero
previously approved these changes
Feb 10, 2025
gaius-qi
force-pushed
the
feature/add-test
branch
from
February 10, 2025 03:26
0c7675e to
717dc8e
Compare
Signed-off-by: Gaius <gaius.qi@gmail.com>
gaius-qi
force-pushed
the
feature/add-test
branch
from
February 10, 2025 03:30
717dc8e to
c1608c7
Compare
yxxhero
approved these changes
Feb 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request includes several changes to the
scheduler/resource/persistentcachepackage, adding new tests for theHost,Peer, andTaskcomponents, and updating dependencies in thego.modfile. The most important changes include the addition of comprehensive test cases forHost,Peer, andTaskstructs, as well as the inclusion of new dependencies for Redis and Redis mock.Test Additions:
scheduler/resource/persistentcache/host_test.go: Added new test cases for theHoststruct, including mock data and a test for theNewHostfunction.scheduler/resource/persistentcache/peer_test.go: Added new test cases for thePeerstruct, including mock data and a test for theNewPeerfunction.scheduler/resource/persistentcache/task_test.go: Added new test cases for theTaskstruct, including mock data and tests for theNewTaskfunction andSizeScopemethod.Dependency Updates:
go.mod: Added new dependencies forgithub.com/go-redis/redisandgithub.com/go-redis/redismock.Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist